package de.hbrs.selectionengine.model;

import java.io.Serializable;
import java.util.List;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.OneToOne;

@Entity
public class Operation implements Serializable {

	private static final long serialVersionUID = 1L;
	@Id
	@GeneratedValue(strategy = GenerationType.AUTO)
	private int id;
	private String name;
	@OneToMany(cascade=CascadeType.ALL, fetch = FetchType.EAGER)
	private List<Param> input;
	@OneToOne(cascade=CascadeType.ALL)
	private Param output;
	
	public int getId() {
		return id;
	}
	public void setId(int id) {
		this.id = id;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public List<Param> getInput() {
		return input;
	}
	public void setInput(List<Param> input) {
		this.input = input;
	}
	public Param getOutput() {
		return output;
	}
	public void setOutput(Param output) {
		this.output = output;
	}
}
